/*******************************************
 * Copyright 2007 Aphrodite Framework for javaME .
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the GNU Public License v2.0
 * which accompanies this distribution, and is available at
 * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * Email : owner@aphroditeme.dev.java.net
 * Contributors:
 *     Kent Elton - initial API and implementation
 *******************************************/

package com.aphrodite.io;

import java.io.InputStream;

/**
 * Interface that handles events that take place in a Http communication process
 * 
 * @author kentelt
 * @see HttpCommManager
 * 
 */
public interface CommProcessNotifier {
	/**
	 * 
	 * @param errorcode
	 *            0 is returned if there is no error code
	 * @param message
	 *            message from the connection failure
	 */
	void handleError(int errorcode, String message);

	void handleResource(InputStream is, long length);

	void processComplete(boolean success);

	void setPercent();
}
